
<!DOCTYPE html>
<html class="no-js">
<head lang="en">

    <#include "../head_import.html" />

</head>
<body>
<#include "../include/top_nav.html">
    <div class="am-cf admin-main">

        <!-- sidebar start -->
        <#include "../order/left.html">
            <!-- sidebar end -->
            <!-- content start-->
            <div class="admin-content">
                <div class="am-cf am-padding">
                    <div class="am-fl am-cf"><@s.m "global.position"/>: <@s.m "order.function.all"/> - <@s.m "global.list"/></div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form class="ropt">
                            <input type="submit" value="<@s.m "global.backToList"/>" onclick="this.form.action='list.do';"/>
                        </form>
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form action="list.do" class="am-form">

                            <div style="padding-top:5px">
                                订单编号: <input type="text" name="code" value="${code!}" style="width:100px;display: inline;"/>
                                收货人: <input type="text" name="userName" value="${userName!}" style="width:100px;display: inline;"/>
                                下单日期:<input type="text" name="startTime" value="${startTime!}"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="width:100px;display: inline;"/>&nbsp;
                                至&nbsp;<input type="text" name="endTime" value="${endTime!}"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="width:100px;display: inline;"/>
                                <select name="status" style="width:200px;display: inline;">
                                    <option value="">--订单状态--</option>
                                    <option value="1" <#if status??><#if 1==status>selected="selected"</#if></#if>>未确认</option>
                                    <option value="2" <#if status??><#if 2==status>selected="selected"</#if></#if>>已确认</option>
                                    <option value="3" <#if status??><#if 3==status>selected="selected"</#if></#if>>已取消</option>
                                    <option value="3" <#if status??><#if 4==status>selected="selected"</#if></#if>>已完成</option>
                                </select>
                                <select name="paymentStatus" style="width:200px;display: inline;">
                                    <option value="">--支付状态--</option>
                                    <option value="1" <#if paymentStatus??><#if 1==paymentStatus>selected="selected"</#if></#if>>未支付</option>
                                    <option value="2" <#if paymentStatus??><#if 2==paymentStatus>selected="selected"</#if></#if>>已支付</option>
                                    <option value="3" <#if paymentStatus??><#if 3==paymentStatus>selected="selected"</#if></#if>>已退款</option>
                                </select>
                                <select name="shippingStatus" style="width:200px;display: inline;">
                                    <option value="">--配送状态--</option>
                                    <option value="1" <#if shippingStatus??><#if 1==shippingStatus>selected="selected"</#if></#if>>未发货</option>
                                    <option value="2" <#if shippingStatus??><#if 2==shippingStatus>selected="selected"</#if></#if>>已发货</option>
                                    <option value="3" <#if shippingStatus??><#if 3==shippingStatus>selected="selected"</#if></#if>>已退货</option>
                                </select>
                                <select name="paymentId" style="width:200px;display: inline;">
                                    <option value="">--支付方式--</option>
                                    <#list paymentList as payment>
                                        <option value="${payment.id}"<#if paymentId??> <#if paymentId==payment.id>selected="selected"</#if></#if>>${payment.name!}</option>
                                    </#list>
                                </select>
                                <select name="shoppingId" style="width:200px;display: inline;">
                                    <option value="">--配送方式--</option>
                                    <#list shippingList as shopping>
                                        <option value="${shopping.id}"<#if shoppingId??> <#if shoppingId==shopping.id>selected="selected"</#if></#if>>${shopping.name!}</option>
                                    </#list>
                                </select>
                                <input type="submit"  value="<@s.m "global.query"/>" />
                            </div>
                        </form>
            </div>
    </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form id="tableForm" method="post" class="am-form">
                            <input type="hidden" name="pageNo" value="${pageNo!}"/>
                            <@p.table value=pagination;order,i,has_next><#rt/>
                            <@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
                            <input type='checkbox' name='ids' value='${order.id}'/><#t/>
                        </@p.column><#t/>
                        <@p.column code="订单编号">${order.code}</@p.column><#t/>
                    <@p.column code="会员名">${order.member.username!}</@p.column><#t/>
                <@p.column code="收货人名称">${order.receiveName!}</@p.column><#t/>
                                    <@p.column code="order.total" align="center">￥${order.total!}<br/>(含运费:${order.freight!0})</@p.column><#t/>
                                <@p.column code="order.createTime" style="width:100px;">${order.createTime}</@p.column><#t/>
                            <@p.column code="order.shipping"><#if order.shipping??>${order.shipping.name}</#if></@p.column><#t/>
                        <@p.column code="order.payment"><#if order.payment??>${order.payment.name!}</#if></@p.column><#t/>
                        <@p.column code="order.status"><@s.m "order.status.${order.status}"/></@p.column><#t/>
                        <@p.column code="order.paymentStatus"><@s.m "order.paymentStatus.${order.paymentStatus}"/></@p.column><#t/>
                        <@p.column code="order.shippingStatus"><@s.m "order.shippingStatus.${order.shippingStatus}"/></@p.column><#t/>
                        <@p.column code="global.operate" align="center">
                        <a href="view.do?id=${order.id}&pageNo=${pageNo!}">查看</a> | <#rt/>
                        <a href="edit.do?id=${order.id}&pageNo=${pageNo!}"><@s.m "global.edit"/></a> | <#rt/>
                        <a href="o_delete.do?ids=${order.id}&pageNo=${pageNo!}" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}"><@s.m "global.delete"/></a><#t/>
                        </@p.column><#t/>
                        </@p.table>
                        <div><input type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/></div>
                        </form>

                        <#include "/common/alert_message.html"/>
                    </div>
                </div>

    </div>

    </div>






<script type="text/javascript">
function getTableForm() {
	return document.getElementById('tableForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	if(!confirm("<@s.m 'global.confirm.delete'/>")) {
		return;
	}
	var f = getTableForm();
	f.action="o_delete.do";
	f.submit();
}
</script>

</body>
</html>